package com.ftf.tp.message.infrastructure.mapper.po;

import com.baomidou.mybatisplus.annotation.*;
import lombok.AllArgsConstructor;
import lombok.Builder;
import lombok.Data;
import lombok.NoArgsConstructor;

import java.util.Date;

/**
 *
 * @author tanghao
 * @date 2022/8/29
 */
@Data
@Builder
@AllArgsConstructor
@NoArgsConstructor
@TableName(value = "notice")
public class Notice {
    @TableId(value = "id", type = IdType.ASSIGN_ID)
    private Long id;

    /**
     * 发送者id
     */
    @TableField(value = "sender_id")
    private Long senderId;

    /**
     * 发送者昵称
     */
    @TableField(value = "sender_nickname")
    private String senderNickname;

    /**
     * 接受者id
     */
    @TableField(value = "receiver_id")
    private Long receiverId;

    /**
     * 发送内容
     */
    @TableField(value = "notice_content")
    private String noticeContent;

    /**
     * 通知类型
     */
    @TableField(value = "notice_type")
    private String noticeType;

    /**
     * 通知内容对象id
     */
    @TableField(value = "notice_object_id")
    private Long noticeObjectId;

    /**
     * 通知内容对象类型
     */
    @TableField(value = "notice_object_type")
    private String noticeObjectType;

    /**
     * 通知内容对象标题\简介\描述
     */
    @TableField(value = "notice_object_about")
    private String noticeObjectAbout;

    /**
     * 通知创建时间
     */
    @TableField(value = "created_time",fill = FieldFill.INSERT)
    private Date createdTime;

    /**
     * 是否已读(0:未读 1:已读)
     */
    @TableField(value = "`status`")
    private Boolean status;

    /**
     * 阅读时间
     */
    @TableField(value = "read_time")
    private Date readTime;
}